<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <!--<title>用户列表</title>-->
    <link rel="stylesheet" type="text/css" th:href="@{/css/bootstrap.css}"/>
    <script type="text/javascript" th:src="@{/js/jquery-3.1.0.min.js}"></script>
    <script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>
</head>

<style>
    a {
        color: #fff;
    }
</style>

<body>

<div style="text-align: center;">
    <div class="btn-group">
        <a class=" btn-primary form-control btn-sm "th:href="@{'/user/insertPage'}">添加</a>
    </div>
</div>
<table class="table table-striped table-bordered table-hover text-center">
    <thead>
    <tr style="text-align:center">
        <th>编号</th>
        <th>姓名</th>
        <th>生日</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="users:${users}">
        <td th:text="${users.id}"></td>
        <td th:text="${users.name}"></td>
        <td th:text="${#dates.format(users.datetime,'yyyy-MM-dd')}"></td>
        <td>
            <a class=" btn-primary" th:href="@{'/user/updatePage/'+${users.id}}">修改</a>
            <a class=" btn-danger" th:href="@{'/user/delete/'+${users.id}}">删除</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>